package org.wotou.authority.web.controller;

import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.wotou.authority.domain.wtuser.wtuserDO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * controller基本类
 *
 * @author zhangQ
 * @date 2017/12/18
 */
public class BaseController {
    protected HttpServletRequest request;
    protected HttpServletResponse response;
    protected wtuserDO wtuer;

    /**
     * 表示请求该类的每个Action前都会首先执行它，也可以将一些准备数据的操作放置在该方法里面。
     *
     * @param request
     * @param response
     * @auther zhangQ
     * @date 2017/11/22 12:28
     */
    @ModelAttribute
    public void setReqAndRes(HttpServletRequest request, HttpServletResponse response) {
        this.request = request;
        this.response = response;
        // this.session = request.getSession();
        // 从缓存中设置菜单
        // this.htadminInfo = (htadminDO) session.getAttribute(Constant.USER_SESSION_ID);
    }
}
